#include "factory.h"
// 得到命令的key值
int cmd_type_func(char *cmd)
{
    if(cmd[0]=='p')
    {
        if(cmd[1]=='u')
            return PUTS;
        else
            return PWD;
    }
    else if(cmd[0]=='g')
        return GETS;
    else if(cmd[0]=='c')
        return CD;
    else if(cmd[0]=='l')
        return LS;
    else if(cmd[0]=='r')
        return REMOVE;
    else 
        return -1;
}